開啟cmd並且複製ssh的選項並貼上
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo docker --version
測試Docker開啟: sudo service docker start
sudo docker ps
下載網址參照: DVWA pre-built image.
sudo docker pull ghcr.io/digininja/dvwa:1232568
sudo docker compose version
sudo docker version
wget https://raw.githubusercontent.com/IamCarron/DVWA-Script/main/Install-DVWA.sh
chmod +x Install-DVWA.sh
sudo ./Install-DVWA.sh
安裝過程跑完後:中間可以設置密碼,按enter等於設定不用密碼
記得登入的預設帳號跟密碼是
帳號: admin
密碼: password
設定完後可以從http://localhost/DVWA/login.php
登入剛剛設定的帳號與密碼
登入畫面: